﻿import request from '/@/utils/request';
enum Api {
  AddDevicesLog = '/api/devicesLog/add',
  DeleteDevicesLog = '/api/devicesLog/delete',
  UpdateDevicesLog = '/api/devicesLog/update',
  PageDevicesLog = '/api/devicesLog/page',
  DetailDevicesLog = '/api/devicesLog/detail',
  GetProjectProjectIdDropdown = '/api/devicesLog/ProjectProjectIdDropdown',
}

// 增加设备通信日志
export const addDevicesLog = (params?: any) =>
	request({
		url: Api.AddDevicesLog,
		method: 'post',
		data: params,
	});

// 删除设备通信日志
export const deleteDevicesLog = (params?: any) => 
	request({
			url: Api.DeleteDevicesLog,
			method: 'post',
			data: params,
		});

// 编辑设备通信日志
export const updateDevicesLog = (params?: any) => 
	request({
			url: Api.UpdateDevicesLog,
			method: 'post',
			data: params,
		});

// 分页查询设备通信日志
export const pageDevicesLog = (params?: any) => 
	request({
			url: Api.PageDevicesLog,
			method: 'post',
			data: params,
		});

// 详情设备通信日志
export const detailDevicesLog = (id: any) => 
	request({
			url: Api.DetailDevicesLog,
			method: 'get',
			data: { id },
		});

export const getProjectProjectIdDropdown = () =>
		request({
		url: Api.GetProjectProjectIdDropdown,
		method: 'get'
		});

